<?php
namespace app\admin\model;

use think\Db;

class Admin extends Common{
    protected $table='admin';
    public function pageData($where=[]){
        $username=isset($where['username'])?$where['username']:'';
        $status=isset($where['status'])?$where['status']:-1;
        return Db::name($this->table)->where($where)->paginate(5,false,[
            'query'=>[
                'username'=>$username,
                'status'=>$status
            ]
        ]);
    }
}